﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations.Schema;

namespace WaterRevenueMS.Componnent.Data.Mapping.ReadMeterMS
{
    partial class MeterRecordMap
    {
        partial void MeterRecordMapAppend()
        {
            this.HasKey(t => t.Id);

            this.Property(t => t.Yi_BZT)
                .HasMaxLength(16);
            this.Property(t => t.Tong_XZT)
                .HasMaxLength(16);
            this.Property(t => t.Kong_ZZT)
                .HasMaxLength(16);
            this.Property(t => t.Fa_MZT)
                .HasMaxLength(16);
            this.Property(t => t.Shu_JZT)
                .HasMaxLength(16);

            this.ToTable("His_MeterRecord");
            this.Property(t => t.Id).HasColumnName("MeterRecord_ID")
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

            this.HasRequired(t => t.MeterInfo).WithMany(t => t.MeterRecords).HasForeignKey(t => t.Meter_No);
            this.HasRequired(t => t.TaskTemplet).WithMany(t => t.MeterRecord).HasForeignKey(t => t.Ren_WMBBH);
        }
    }
}
